<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: 解强
  Date: 2021/11/22
  Time: 11:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}\resource\js\bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}\resource\js\jquery-3.2.1.js"></script>
    <script src="${pageContext.request.contextPath}\resource\js\WdatePicker.js"></script>

</head>
<body>

<form action="tian" method="post">


    订单编号<input type="text" name="oid" value="${xue}" readonly="readonly"/>
    下单时间<input name="otime" type="date"/>
    <br>
    仓库<select name="cangku">
    <option value="A仓库">A仓库</option>
    <option value="B仓库">B仓库</option>
    <option value="C仓库">C仓库</option>
    </select>
    订货人<input type="text" name="orderer">
<br>
    库位<input type="text" name="kuwei"/>
物流单号<input type="text" name="odd"/>
总金额<input type="text" name="gross"/>   <span id="zong"></span>
    附件成本<input type="text" name="chengben"><span id="cheng"></span>
<br>
    折让金额<input type="text" name="rebate"> <span id="zhe"></span>
    制单人:<input type="text" name="yname" value="${cun.yname}">
    <input type="hidden" name="yid" value="${cun.yid}">
    <br>

    交货方式<select name="way">
    <option value="送货上门">送货上门</option>
    <option value="到店自取">到店自取</option>


</select>
    交易地点<input type="text" name="dizhi">


    <table id="zz">
        <tr>
            <td>商品编号</td>
            <td>商品名称</td>
            <td>型号</td>
            <td>单价</td>
            <td>数量</td>
            <td>金额</td>
            <td>备注</td>

        </tr>

        <tr>

            <td><input type="text" name="list[0].bianhao"></td>
            <td><input type="text" name="list[0].pname"></td>
            <td><input type="text" name="list[0].model"></td>
            <td><input type="text" name="list[0].danjia"></td>
            <td><input type="text" name="list[0].shuliang"></td>
            <td><input type="text" name="list[0].jine"></td>
            <td><input type="text" name="list[0].beizhu"></td>


        </tr>




    </table>



<input type="submit" value="提交">

    <script>

        function zxc(){

            var w="/^(\d+||\d+.\d{1,2})$/"

            if (!w.test($("[name='gross']").val())){
                $("#zong").text("整数、1位小数、2位小数")
            }

            if (!w.test($("[name='rebate']").val())){
                $("#zhe").text("整数、1位小数、2位小数")
            }
            if (!w.test($("[name='chengben']").val())){
                $("#cheng").text("整数、1位小数、2位小数")
            }

if ($("span").text()==''){

    $("form").submit();
}


        }


    </script>


</form>



</body>
</html>
